import type {App,VNode} from 'vue'
import { createVNode,render } from "vue";
import Loading from "./index.vue";
export default {
  install(app:App){ // app返回的组件实例
   const vNode:VNode= createVNode(Loading) // 创建节点
   render(vNode,document.body) // 将节点渲染到body上
   app.config.globalProperties._loading={
    show:vNode.component.setupState.show,
    hide:vNode.component.setupState.hide
   }
  }
  
}
